package com.iris.live.services.common.reconsitution;

/**
 * yitianle
 * 2017/4/24.
 */
public class CodeUtils {
    // 随机的字符串申明
    private final static String[] str = { "0", "1", "2", "3", "4", "5", "6",
            "7", "8", "9" };

    /**
     * 生成6位字符串
     * @return
     */
    public static String getValidationCode(){
        String s = "";
        for (int i = 0; i < 6; i++) {
            int a = (int) (Math.random() * 10);
            s += str[a];
        }
        return s;
    }


}
